package com.airticketbooking.service.serviceImpl;


import com.airticketbooking.common.domain.PageQuery;
import com.airticketbooking.po.Aircrafttype;
import com.airticketbooking.mapper.AircrafttypeMapper;
import com.airticketbooking.service.AircrafttypeService;
import com.github.pagehelper.PageHelper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;

/**
 * (Aircrafttypes)表服务实现类
 *
 * @author makejava
 * @since 2024-10-10 15:17:38
 */
@Service
@RequiredArgsConstructor

public class AircrafttypeServiceImpl implements AircrafttypeService {

	private final AircrafttypeMapper aircrafttypeMapper;

	/**
	 * 通过ID查询单条数据
	 *
	 * @param aircrafttypeId 主键
	 * @return 实例对象
	 */
	@Override
	public Aircrafttype queryById(Integer aircrafttypeId) {
		return aircrafttypeMapper.queryById(aircrafttypeId);
	}

	@Override
	public Page<Aircrafttype> queryByPage(PageQuery pageQuery) {

		PageHelper.startPage(pageQuery.getPageNo(), pageQuery.getPageSize());

		Page<Aircrafttype> PageInfo = aircrafttypeMapper.queryByPage();

		return PageInfo;

	}


}
